home *** CD-ROM | disk | FTP | other *** search
/ AmigActive 10 / AACD 10.iso / AACD / Magazine / Morphos / GCC / ppc-amigaos / lib / ldscripts / elf32ppc.xr < prev    next >
Text File  |  1997-09-16  |  4KB  |  115 lines

  1. OUTPUT_FORMAT("elf32-powerpc", "elf32-powerpc",
  2.           "elf32-powerpc")
  3. OUTPUT_ARCH(powerpc)
  4. ENTRY(_start)
  5.  /* For some reason, the Solaris linker makes bad executables
  6.   if gld -r is used and the intermediate file has sections starting
  7.   at non-zero addresses.  Could be a Solaris ld bug, could be a GNU ld
  8.   bug.  But for now assigning the zero vmas works.  */
  9. SECTIONS
  10. {
  11.   /* Read-only sections, merged into text segment: */
  12.   .interp 0 : { *(.interp) }
  13.   .hash        0 : { *(.hash)        }
  14.   .dynsym    0 : { *(.dynsym)        }
  15.   .dynstr    0 : { *(.dynstr)        }
  16.   .rela.text    0 : { *(.rela.text)     }
  17.   .rela.data    0 : { *(.rela.data)     }
  18.   .rela.rodata    0 : { *(.rela.rodata)     }
  19.   .rela.got    0 : { *(.rela.got)    }
  20.   .rela.got1    0 : { *(.rela.got1)    }
  21.   .rela.got2    0 : { *(.rela.got2)    }
  22.   .rela.ctors    0 : { *(.rela.ctors)    }
  23.   .rela.dtors    0 : { *(.rela.dtors)    }
  24.   .rela.init    0 : { *(.rela.init)    }
  25.   .rela.fini    0 : { *(.rela.fini)    }
  26.   .rela.bss    0 : { *(.rela.bss)    }
  27.   .rela.plt    0 : { *(.rela.plt)    }
  28.   .rela.sdata    0 : { *(.rela.sdata2)    }
  29.   .rela.sbss    0 : { *(.rela.sbss2)    }
  30.   .rela.sdata2    0 : { *(.rela.sdata2)    }
  31.   .rela.sbss2    0 : { *(.rela.sbss2)    }
  32.   .plt 0 : { *(.plt) }
  33.   .text    0 :
  34.   {
  35.     *(.text)
  36.     /* .gnu.warning sections are handled specially by elf32.em.  */
  37.     *(.gnu.warning)
  38.   } =0
  39.   .init        0 : { *(.init)        } =0
  40.   .fini        0 : { *(.fini)        } =0
  41.   .rodata    0 : { *(.rodata)  }
  42.   .rodata1    0 : { *(.rodata1) }
  43.   .sdata2 0 : { *(.sdata2) }
  44.   .sbss2 0 : { *(.sbss2) }
  45.   /* Adjust the address for the data segment.  We want to adjust up to
  46.      the same address within the page on the next page up.  It would
  47.      be more correct to do this:
  48.      The current expression does not correctly handle the case of a
  49.      text segment ending precisely at the end of a page; it causes the
  50.      data segment to skip a page.  The above expression does not have
  51.      this problem, but it will currently (2/95) cause BFD to allocate
  52.      a single segment, combining both text and data, for this case.
  53.      This will prevent the text segment from being shared among
  54.      multiple executions of the program; I think that is more
  55.      important than losing a page of the virtual address space (note
  56.      that no actual memory is lost; the page which is skipped can not
  57.      be referenced).  */
  58.   .data  0 :
  59.   {
  60.     *(.data)
  61.   }
  62.   .data1 0 : { *(.data1) }
  63.   .got1        0 : { *(.got1) }
  64.   .dynamic    0 : { *(.dynamic) }
  65.   /* Put .ctors and .dtors next to the .got2 section, so that the pointers
  66.      get relocated with -mrelocatable. Also put in the .fixup pointers.
  67.      The current compiler no longer needs this, but keep it around for 2.7.2  */
  68.         
  69.   .got2        0 :  { *(.got2) }
  70.         
  71.   .ctors    0 : { *(.ctors) }
  72.         
  73.         
  74.   .dtors    0 : { *(.dtors) }
  75.         
  76.         
  77.   .fixup    0 : { *(.fixup) }
  78.         
  79.         
  80.         
  81.   .got        0 : { *(.got) }
  82.   .got.plt    0 : { *(.got.plt) }
  83.         
  84.   /* We want the small data sections together, so single-instruction offsets
  85.      can access them all, and initialized data all before uninitialized, so
  86.      we can shorten the on-disk segment size.  */
  87.   .sdata    0 : { *(.sdata) }
  88.   .sbss    0 :
  89.   {
  90.     *(.sbss)
  91.     *(.scommon)
  92.   }
  93.   .bss     0 :
  94.   {
  95.    *(.dynbss)
  96.    *(.bss)
  97.    *(COMMON)
  98.   }
  99.   /* These are needed for ELF backends which have not yet been
  100.      converted to the new style linker.  */
  101.   .stab 0 : { *(.stab) }
  102.   .stabstr 0 : { *(.stabstr) }
  103.   /* DWARF debug sections.
  104.      Symbols in the .debug DWARF section are relative to the beginning of the
  105.      section so we begin .debug at 0.  It's not clear yet what needs to happen
  106.      for the others.   */
  107.   .debug          0 : { *(.debug) }
  108.   .debug_srcinfo  0 : { *(.debug_srcinfo) }
  109.   .debug_aranges  0 : { *(.debug_aranges) }
  110.   .debug_pubnames 0 : { *(.debug_pubnames) }
  111.   .debug_sfnames  0 : { *(.debug_sfnames) }
  112.   .line           0 : { *(.line) }
  113.   /* These must appear regardless of .  */
  114. }
  115.